package com.ymatou.iapi.godmch.service;

import org.json.JSONException;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*获取前端交互状态Call
*FreeMaker Template自动生成代码
*/
public class getInteractionStateCall extends YmatouBaseCall{
	private static String opurl ="api/config/getInteractionState";
	
	public getInteractionStateCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public String getStatus1()
	{
		  return getString("status");
	}
		
    public String getMessage()
	{
		 return getString("msg");
	}
    
    
    public Integer getMchId() throws JSONException
	{
	  return new JSONObject(getString("result").toString()).getInt("mchId");
	}
	
	public String getBizKey() throws JSONException
	{
	  return new JSONObject(getString("result").toString()).getString("bizKey");
	}
    
	
	public String getBizValue() throws JSONException
	{
	  return new JSONObject(getString("result").toString()).getString("bizValue");
	}
}